package com.ruoyi.pad.service.impl;

import com.alibaba.fastjson2.JSON;
import com.ruoyi.common.constant.DeptNameConstants;
import com.ruoyi.common.enums.DeptType;
import com.ruoyi.dgdData.domain.pad.DataDgdPadToServerDTO;
import com.ruoyi.dgdData.domain.pad.DgdTaskReqDTO;
import com.ruoyi.dgdData.domain.plat.*;
import com.ruoyi.dgdData.service.*;
import com.ruoyi.djData.domain.pad.DataDjPadToServerDTO;
import com.ruoyi.djData.domain.pad.DjTaskReqDTO;
import com.ruoyi.djData.domain.plat.DataDj;
import com.ruoyi.djData.service.IDataDjService;
import com.ruoyi.jkcrData.domain.pad.DataJkcrPadToServerDTO;
import com.ruoyi.jkcrData.domain.pad.JkcrTaskReqDTO;
import com.ruoyi.jkcrData.domain.plat.*;
import com.ruoyi.jkcrData.service.*;
import com.ruoyi.kyjData.domain.pad.KyjPadToServerReqDTO;
import com.ruoyi.kyjData.domain.pad.KyjTaskResqDTO;
import com.ruoyi.kyjData.domain.plat.DataKyj;
import com.ruoyi.kyjData.service.IDataKyjService;
import com.ruoyi.pad.domain.KyPadInfo;
import com.ruoyi.pad.service.IKyTaskSubmitService;
import com.ruoyi.pidaijiData.domain.pad.DataPidaijiPadToServerDTO;
import com.ruoyi.pidaijiData.domain.pad.PidaijiTaskReqDTO;
import com.ruoyi.pidaijiData.domain.plat.*;
import com.ruoyi.pidaijiData.service.*;
import com.ruoyi.shbData.domain.pad.ShbPadToServerDTO;
import com.ruoyi.shbData.domain.pad.ShbTaskReqDTO;
import com.ruoyi.shbData.domain.plat.DataShb;
import com.ruoyi.shbData.service.IDataShbService;
import com.ruoyi.task.domain.TaskSubmitResp;
import com.ruoyi.task.domain.entity.DataTaskEntity;
import com.ruoyi.task.service.IDataTaskService;
import com.ruoyi.tfjData.domain.pad.DataTfjPadToServerDTO;
import com.ruoyi.tfjData.domain.pad.TfjTask;
import com.ruoyi.tfjData.domain.plat.DataTfj;
import com.ruoyi.tfjData.service.IDataTfjService;
import com.ruoyi.tsjData.domain.pad.DataTshjPadToServerDTO;
import com.ruoyi.tsjData.domain.pad.TshjTaskReqDTO;
import com.ruoyi.tsjData.domain.plat.*;
import com.ruoyi.tsjData.service.*;
import com.ruoyi.wgjlcData.domain.pad.DataWgjlcPadToServerDTO;
import com.ruoyi.wgjlcData.domain.pad.WgjlcTaskReqDTO;
import com.ruoyi.wgjlcData.domain.plat.*;
import com.ruoyi.wgjlcData.service.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName KyTaskSubmitServiceImpl
 * @Description TODO
 * @Author jiayuan
 * @Date 2023/10/26 11:31
 * @Version 1.0
 */
@Slf4j
@Service
public class KyTaskSubmitServiceImpl implements IKyTaskSubmitService {

    @Autowired
    private IDataTaskService dataTaskService;

    @Autowired
    private IDataTshjHjService hjService;

    @Autowired
    private IDataTshjJxService jxService;

    @Autowired
    private IDataTshjKxchService kxchService;

    @Autowired
    private IDataTshjPbService pbService;

    @Autowired
    private IDataTshjSdService sdService;

    @Autowired
    private IDataTshjTyxnService tyxnService;

    @Autowired
    private IDataTshjWshService wshService;

    @Autowired
    private IDataTshjYyService yyService;

    @Autowired
    private IDataTshjZhdlService zhdlService;

    @Autowired
    private IDataTshjZhdService zhdService;

    @Autowired
    private IDataTshjJchmjService jchmjService;

    @Autowired
    private IDataTshjLylService lylService;

    @Autowired
    private IDataTshjZhdoService zhdoService;

    @Autowired
    private IDataTshjZhduService zhduService;

    @Autowired
    private IDataTshjZshService zshService;

    @Autowired
    private IDataKyjService dataKyjService;

    @Autowired
    private IDataShbService dataShbService;

    @Autowired
    private IDataTfjService dataTfjService;

    @Autowired
    private IDataDgdBmwdService bmwdService;

    @Autowired
    private IDataDgdHjService dgdHjService;

    @Autowired
    private IDataDgdHshlService hshlService;

    @Autowired
    private IDataDgdJdService jdService;

    @Autowired
    private IDataDgdKdshjService kdshjService;

    @Autowired
    private IDataDgdKzxshService kzxshService;

    @Autowired
    private IDataDgdLqshService lqshService;

    @Autowired
    private IDataDgdMzxxService mzxxService;

    @Autowired
    private IDataDgdPqwdService pqwdService;

    @Autowired
    private IDataDgdQylService qyService;

    @Autowired
    private IDataDgdSdService dgdSdService;

    @Autowired
    private IDataDgdYlService ylService;

    @Autowired
    private IDataDgdZhdlService dgdZhdlService;

    @Autowired
    private IDataDjService dataDjService;

    @Autowired
    private IDataJkcrGzyyService dataJkcrGzyyService;

    @Autowired
    private IDataJkcrHdqjService dataJkcrHdqjService;

    @Autowired
    private IDataJkcrJzhlService dataJkcrJzhlService;

    @Autowired
    private IDataJkcrQylService dataJkcrQylService;

    @Autowired
    private IDataJkcrYxsdService dataJkcrYxsdService;

    @Autowired
    private IDataJkcrZhchshxService dataJkcrZhchshxService;

    @Autowired
    private IDataJkcrZhchxxService dataJkcrZhchxxService;

    @Autowired
    private IDataJkcrZhdlService dataJkcrZhdlService;

    @Autowired
    private IDataWgjlcChwqdService dataWgjlcChwqdService;

    @Autowired
    private IDataWgjlcCzjService dataWgjlcCzjService;

    @Autowired
    private IDataWgjlcCzlService dataWgjlcCzlService;

    @Autowired
    private IDataWgjlcPdtchzhdService dataWgjlcPdtchzhdService;

    @Autowired
    private IDataWgjlcPpnlService dataWgjlcPpnlService;

    @Autowired
    private IDataWgjlcShshlService dataWgjlcShshlService;

    @Autowired
    private IDataWgjlcSuduService dataWgjlcSuduService;

    @Autowired
    private IDataWgjlcTblService dataWgjlcTblService;

    @Autowired
    private IDataWgjlcWdbhService dataWgjlcWdbhService;

    @Autowired
    private IDataWgjlcWeiqiService dataWgjlcWeiqiService;

    @Autowired
    private IDataWgjlcYandujiService dataWgjlcYandujiService;

    @Autowired
    private IDataWgjlcYlbhService dataWgjlcYlbhService;

    @Autowired
    private IDataWgjlcZdjzdlService dataWgjlcZdjzdlService;

    @Autowired
    private IDataWgjlcZdqylService dataWgjlcZdqylService;

    @Autowired
    private IDataWgjlcZhdjlgpsService dataWgjlcZhdjlgpsService;

    @Autowired
    private IDataWgjlcZhmhxhService dataWgjlcZhmhxhService;

    @Autowired
    private IDataWgjlcZshhjshService dataWgjlcZshhjshService;

    @Autowired
    private IDataWgjlcZxtgbjService dataWgjlcZxtgbjService;

    @Autowired
    private IDataPidaijiChengzhongService dataPidaijiChengzhongService;

    @Autowired
    private IDataPidaijiJxtdService dataPidaijiJxtdService;

    @Autowired
    private IDataPidaijiNhService dataPidaijiNhService;

    @Autowired
    private IDataPidaijiPpzylService dataPidaijiPpzylService;

    @Autowired
    private IDataPidaijiDmbhzylService dataPidaijiDmbhzylService;

    @Autowired
    private IDataPidaijiSuduService dataPidaijiSuduService;

    @Autowired
    private IDataPidaijiYyService dataPidaijiYyService;

    @Autowired
    private IDataPidaijiZxService dataPidaijiZxService;

    /**
     * 提交提升机数据
     * @param kyPadInfoEntity
     * @param dataTshjPadToServerDTO
     * @return
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public TaskSubmitResp submitTsjTasks(KyPadInfo kyPadInfoEntity, DataTshjPadToServerDTO dataTshjPadToServerDTO) {
        TaskSubmitResp taskSubmitRespDTO = new TaskSubmitResp();
        // 测试任务集合
        List<TshjTaskReqDTO> tshjTaskReqDTOList = dataTshjPadToServerDTO.getData();
        // 先遍历数据，如果测试任务已经提交,则进行提示
        for (TshjTaskReqDTO tshjTaskDTO : tshjTaskReqDTOList) {
            DataTaskEntity dataTaskEntity = tshjTaskDTO.getDataTaskEntity();
            taskSubmitRespDTO.getUploadTaskIds().add(dataTaskEntity.getId());
            dataTaskEntity.setPadSn(dataTshjPadToServerDTO.getPadSn());
            dataTaskEntity.setDeptId(kyPadInfoEntity.getDeptId());
            // 如果是个人用户设置,设置用户ID
            if (kyPadInfoEntity.getDeptId().equals(DeptType.getIdByType(DeptNameConstants.ROLE_NAME_PERSONAL))) {
                dataTaskEntity.setUserId(kyPadInfoEntity.getUserId());
            }
            // 单条插入任务
            dataTaskService.insertDataTask(dataTaskEntity);
            // 插入后的任务ID
            long dataTaskId = dataTaskEntity.getDataTaskId();
            //环境测试数据
            List<DataTshjHj> tshjHjResults = tshjTaskDTO.getHjTestList();
            if (!tshjHjResults.isEmpty()) {
                tshjHjResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                hjService.batchDataTshjHj(tshjHjResults);
            }
            //间隙测试数据
            List<DataTshjJx> tshjJxResults = tshjTaskDTO.getJxTestList();
            if (!tshjJxResults.isEmpty()) {
                tshjJxResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                jxService.batchDataTshjJx(tshjJxResults);
            }
            //空行程测试数据
            List<DataTshjKxch> tshjKxchResults = tshjTaskDTO.getKxchTestList();
            if (!tshjKxchResults.isEmpty()) {
                tshjKxchResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                kxchService.batchDataTshjKxch(tshjKxchResults);
            }
            //偏摆测试数据
            List<DataTshjPb> tshjPbResults = tshjTaskDTO.getPbTestList();
            if (!tshjPbResults.isEmpty()) {
                tshjPbResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                pbService.batchDataTshjPb(tshjPbResults);
            }
            //速度测试数据
            List<DataTshjSd> tshjSdResults = tshjTaskDTO.getSdTestList();
            if (!tshjSdResults.isEmpty()) {
                tshjSdResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                sdService.batchDataTshjSd(tshjSdResults);
            }
            //调压性能数据
            List<DataTshjTyxn> tshjTyxnResults = tshjTaskDTO.getTyxnTestList();
            if (!tshjTyxnResults.isEmpty()) {
                tshjTyxnResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                tyxnService.batchDataTshjTyxn(tshjTyxnResults);
            }
            //温升性能数据
            List<DataTshjWsh> tshjWshResults = tshjTaskDTO.getWshTestList();
            if (!tshjWshResults.isEmpty()) {
                tshjWshResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                wshService.batchDataTshjWsh(tshjWshResults);
            }
            // 液压性能数据
            List<DataTshjYy> tshjYyResults = tshjTaskDTO.getYyTestList();
            if (!tshjYyResults.isEmpty()) {
                tshjYyResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                yyService.batchDataTshjYy(tshjYyResults);
            }
            // 制动力数据
            List<DataTshjZhdl> tshjZhdlResults = tshjTaskDTO.getZhdlTestList();
            if (!tshjZhdlResults.isEmpty()) {
                tshjZhdlResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                zhdlService.batchDataTshjZhdl(tshjZhdlResults);
            }
            // 制动数据
            List<DataTshjZhd> tshjZhdResults = tshjTaskDTO.getZhdTestList();
            if (!tshjZhdResults.isEmpty()) {
                tshjZhdResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                zhdService.batchDataTshjZhd(tshjZhdResults);
            }
            // 接触面积数据
            List<DataTshjJchmj> tshjJchmjResults = tshjTaskDTO.getJchmjEntityList();
            if (!tshjJchmjResults.isEmpty()) {
                tshjJchmjResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                jchmjService.batchDataTshjJchmj(tshjJchmjResults);
            }
            // 拉压力数据
            List<DataTshjLyl> tshjLylResults = tshjTaskDTO.getLylEntityList();
            if (!tshjLylResults.isEmpty()) {
                tshjLylResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                lylService.batchDataTshjLyl(tshjLylResults);
            }
            // 振动数据
            List<DataTshjZhdo> tshjZhdoResults = tshjTaskDTO.getZhdoEntityList();
            if (!tshjZhdoResults.isEmpty()) {
                tshjZhdoResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                zhdoService.batchDataTshjZhdo(tshjZhdoResults);
            }
            // 照度数据
            List<DataTshjZhdu> tshjZhduResults = tshjTaskDTO.getZhduEntityList();
            if (!tshjZhduResults.isEmpty()) {
                tshjZhduResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                zhduService.batchDataTshjZhdu(tshjZhduResults);
            }
            // 噪声数据
            List<DataTshjZsh> tshjZshResults = tshjTaskDTO.getZshEntityList();
            if (!tshjZshResults.isEmpty()) {
                tshjZshResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                zshService.batchDataTshjZsh(tshjZshResults);
            }
            taskSubmitRespDTO.getSuccessTaskIds().add(tshjTaskDTO.getDataTaskEntity().getId());
        }

        log.error("提升机任务提交：" + JSON.toJSONString(taskSubmitRespDTO));
        return taskSubmitRespDTO;
    }


    /**
     * 提交空压机数据
     * @param kyPadInfo
     * @param dataKyjVo
     * @return
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public TaskSubmitResp submitKyjTasks(KyPadInfo kyPadInfo, KyjPadToServerReqDTO dataKyjVo) {
        TaskSubmitResp taskSubmitRespDTO = new TaskSubmitResp();
        List<KyjTaskResqDTO> kyjTaskResqDTOList = dataKyjVo.getData();
        // 提交的全部任务ID
        List<Long> uploadTaskIdList = new ArrayList<>();
        // 先遍历数据，如果测试任务已经提交,则进行提示
        for (int i = 0; i < kyjTaskResqDTOList.size(); i++) {
            KyjTaskResqDTO kyjTaskResqDTO = kyjTaskResqDTOList.get(i);
            DataTaskEntity dataTaskEntity = kyjTaskResqDTO.getDataTaskEntity();
            taskSubmitRespDTO.getUploadTaskIds().add(dataTaskEntity.getId());
            uploadTaskIdList.add(dataTaskEntity.getId());
            dataTaskEntity.setPadSn(kyPadInfo.getPadSn());
            dataTaskEntity.setDeptId(kyPadInfo.getDeptId());
            // 如果是个人用户设置,设置用户ID
            if (kyPadInfo.getDeptId().equals(DeptType.getIdByType(DeptNameConstants.ROLE_NAME_PERSONAL))) {
                dataTaskEntity.setUserId(kyPadInfo.getUserId());
            }
            // 插入任务
            dataTaskService.insertDataTask(dataTaskEntity);
            // 插入后的任务ID
            long dataTaskId = dataTaskEntity.getDataTaskId();
            // 测试结果
            List<DataKyj> kyjResults = kyjTaskResqDTO.getResultList();
            if (!kyjResults.isEmpty()) {
                kyjResults.forEach(item -> item.setDataTaskId(dataTaskId));
                dataKyjService.batchDataKyj(kyjResults);
            }
            taskSubmitRespDTO.getSuccessTaskIds().add(kyjTaskResqDTO.getDataTaskEntity().getId());
        }
        log.error("空压机任务提交：" + JSON.toJSONString(taskSubmitRespDTO));
        return taskSubmitRespDTO;
    }

    /**
     * 水泵提交数据
     *
     * @param kyPadInfo
     * @param dataShbVo
     * @return
     */
    @Override
    public TaskSubmitResp submitTasks(KyPadInfo kyPadInfo, ShbPadToServerDTO dataShbVo) {
        TaskSubmitResp taskSubmitRespDTO = new TaskSubmitResp();
        // 测试任务集合
        List<ShbTaskReqDTO> shbTaskReqDTOList = dataShbVo.getData();
        // 先遍历数据，如果测试任务已经提交,则进行提示
        for (ShbTaskReqDTO shbTaskDTO : shbTaskReqDTOList) {
            DataTaskEntity dataTaskEntity = shbTaskDTO.getDataTask();
            taskSubmitRespDTO.getUploadTaskIds().add(dataTaskEntity.getId());
            dataTaskEntity.setPadSn(kyPadInfo.getPadSn());
            dataTaskEntity.setDeptId(kyPadInfo.getDeptId());
            // 如果是个人用户设置,设置用户ID
            if (kyPadInfo.getDeptId().equals(DeptType.getIdByType(DeptNameConstants.ROLE_NAME_PERSONAL))) {
                dataTaskEntity.setUserId(kyPadInfo.getUserId());
            }
            // 单条插入任务
            dataTaskService.insertDataTask(dataTaskEntity);
            // 插入后的任务ID
            long dataTaskId = dataTaskEntity.getDataTaskId();
            List<DataShb> shbResults = shbTaskDTO.getResultList();
            if (!shbResults.isEmpty()) {
                shbResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataShbService.batchDataShb(shbResults);
            }
            taskSubmitRespDTO.getSuccessTaskIds().add(shbTaskDTO.getDataTask().getId());
        }

        log.error("水泵任务提交：" + JSON.toJSONString(taskSubmitRespDTO));
        return taskSubmitRespDTO;
    }

    /**
     * 通风机提交数据
     *
     * @param kyPadInfo
     * @param dataTfjVo
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public TaskSubmitResp submitTfjTasks(KyPadInfo kyPadInfo, DataTfjPadToServerDTO dataTfjVo) {
        TaskSubmitResp taskSubmitRespDTO = new TaskSubmitResp();
        List<TfjTask> tfjTasks = dataTfjVo.getData();
        // 先遍历数据，如果测试任务已经提交,则进行提示
        for (int i = 0; i < tfjTasks.size(); i++) {
            TfjTask tfjTask = tfjTasks.get(i);
            DataTaskEntity dataTaskEntity = tfjTask.getDataTask();
            taskSubmitRespDTO.getUploadTaskIds().add(dataTaskEntity.getId());
            dataTaskEntity.setPadSn(kyPadInfo.getPadSn());
            dataTaskEntity.setDeptId(kyPadInfo.getDeptId());
            // 如果是个人用户设置设置用户ID
            if (kyPadInfo.getDeptId().equals(DeptType.getIdByType(DeptNameConstants.ROLE_NAME_PERSONAL))) {
                dataTaskEntity.setUserId(kyPadInfo.getUserId());
            }
            // 插入任务
            dataTaskService.insertDataTask(dataTaskEntity);
            // 插入后的任务ID
            long dataTaskId = dataTaskEntity.getDataTaskId();
            // 测试结果
            List<DataTfj> tfjResults = tfjTask.getResultList();
            if (tfjResults.size() != 0) {
                tfjResults.forEach(item -> item.setDataTaskId(dataTaskId));
                dataTfjService.batchDataTfj(tfjResults);
            }
            taskSubmitRespDTO.getSuccessTaskIds().add(tfjTask.getDataTask().getId());
        }
        log.error("通风机任务提交：" + JSON.toJSONString(taskSubmitRespDTO));
        return taskSubmitRespDTO;
    }

    /**
     * 单轨吊提交数据
     *
     * @param kyPadInfo
     * @param dataDgdVo
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public TaskSubmitResp submitDgdTasks(KyPadInfo kyPadInfo, DataDgdPadToServerDTO dataDgdVo) {
        TaskSubmitResp taskSubmitRespDTO = new TaskSubmitResp();
        // 测试任务集合
        List<DgdTaskReqDTO> dgdTaskReqDTOList = dataDgdVo.getData();
        // 先遍历数据，如果测试任务已经提交,则进行提示
        for (DgdTaskReqDTO dgdTaskDTO : dgdTaskReqDTOList) {
            DataTaskEntity dataTaskEntity = dgdTaskDTO.getDataTaskEntity();
            taskSubmitRespDTO.getUploadTaskIds().add(dataTaskEntity.getId());
            dataTaskEntity.setPadSn(kyPadInfo.getPadSn());
            dataTaskEntity.setDeptId(kyPadInfo.getDeptId());
            // 如果是个人用户设置,设置用户ID
            if (kyPadInfo.getDeptId().equals(DeptType.getIdByType(DeptNameConstants.ROLE_NAME_PERSONAL))) {
                dataTaskEntity.setUserId(kyPadInfo.getUserId());
            }
            // 单条插入任务
            dataTaskService.insertDataTask(dataTaskEntity);
            // 插入后的任务ID
            long dataTaskId = dataTaskEntity.getDataTaskId();
            //表面温度测试数据
            List<DataDgdBmwd> dgdBmwdResults = dgdTaskDTO.getBmwdEntityList();
            if (!dgdBmwdResults.isEmpty()) {
                dgdBmwdResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                bmwdService.batchDataDgdBmwd(dgdBmwdResults);
            }
            //环境测试数据
            List<DataDgdHj> dgdHjResults = dgdTaskDTO.getHjTestList();
            if (!dgdHjResults.isEmpty()) {
                dgdHjResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dgdHjService.batchDataDgdHj(dgdHjResults);
            }
            //回绳力测试数据
            List<DataDgdHshl> tshjHshlResults = dgdTaskDTO.getHshlyzhjlEntityList();
            if (!tshjHshlResults.isEmpty()) {
                tshjHshlResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                hshlService.batchDataDgdHshl(tshjHshlResults);
            }
            //角度测试数据
            List<DataDgdJd> dgdJdResults = dgdTaskDTO.getJdTestList();
            if (!dgdJdResults.isEmpty()) {
                dgdJdResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                jdService.batchDataDgdJd(dgdJdResults);
            }
            //空动时间测试数据
            List<DataDgdKdshj> dgdKdshjResults = dgdTaskDTO.getKdshjEntityList();
            if (!dgdKdshjResults.isEmpty()) {
                dgdKdshjResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                kdshjService.batchDataDgdKdshj(dgdKdshjResults);
            }
            //空载向上制动减速度测试数据
            List<DataDgdKzxsh> dgdKzxshResults = dgdTaskDTO.getKzxshEntityList();
            if (!dgdKzxshResults.isEmpty()) {
                dgdKzxshResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                kzxshService.batchDataDgdKzxsh(dgdKzxshResults);
            }
            //冷却水能数据
            List<DataDgdLqsh> dgdLqshResults = dgdTaskDTO.getLqshwdEntityList();
            if (!dgdLqshResults.isEmpty()) {
                dgdLqshResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                lqshService.batchDataDgdLqsh(dgdLqshResults);
            }
            // 满载向下制动距离数据
            List<DataDgdMzxx> dgdMzxxResults = dgdTaskDTO.getMzxxEntityList();
            if (!dgdMzxxResults.isEmpty()) {
                dgdMzxxResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                mzxxService.batchDataDgdMzxx(dgdMzxxResults);
            }
            // 排气温度数据
            List<DataDgdPqwd> dgdPqwdResults = dgdTaskDTO.getPqwdEntityList();
            if (!dgdPqwdResults.isEmpty()) {
                dgdPqwdResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                pqwdService.batchDataDgdPqwd(dgdPqwdResults);
            }
            // 牵引力数据
            List<DataDgdQyl> dgdQylResults = dgdTaskDTO.getQylEntityList();
            if (!dgdQylResults.isEmpty()) {
                dgdQylResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                qyService.batchDataDgdQyl(dgdQylResults);
            }
            // 速度数据
            List<DataDgdSd> dgdSdResults = dgdTaskDTO.getSdTestList();
            if (!dgdSdResults.isEmpty()) {
                dgdSdResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dgdSdService.batchDataDgdSd(dgdSdResults);
            }
            // 压力数据
            List<DataDgdYl> dgdYlResults = dgdTaskDTO.getYlEntityList();
            if (!dgdYlResults.isEmpty()) {
                dgdYlResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                ylService.batchDataDgdYl(dgdYlResults);
            }
            // 制动力数据
            List<DataDgdZhdl> dgdZhdlResults = dgdTaskDTO.getZhdlEntityList();
            if (!dgdZhdlResults.isEmpty()) {
                dgdZhdlResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dgdZhdlService.batchDataDgdZhdl(dgdZhdlResults);
            }
            taskSubmitRespDTO.getSuccessTaskIds().add(dgdTaskDTO.getDataTaskEntity().getId());
        }

        log.error("单轨吊任务提交：" + JSON.toJSONString(taskSubmitRespDTO));
        return taskSubmitRespDTO;
    }

    /**
     * 电机数据提交
     *
     * @param kyPadInfo
     * @param dataDjVo
     * @return
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public TaskSubmitResp submitDjTasks(KyPadInfo kyPadInfo, DataDjPadToServerDTO dataDjVo) {
        TaskSubmitResp taskSubmitRespDTO = new TaskSubmitResp();
        List<DjTaskReqDTO> djTaskResqDTOList = dataDjVo.getData();
        // 提交的全部任务ID
        List<Long> uploadTaskIdList = new ArrayList<>();
        // 先遍历数据，如果测试任务已经提交,则进行提示
        for (int i = 0; i < djTaskResqDTOList.size(); i++) {
            DjTaskReqDTO djTaskResqDTO = djTaskResqDTOList.get(i);
            DataTaskEntity dataTaskEntity = djTaskResqDTO.getDataTaskEntity();
            taskSubmitRespDTO.getUploadTaskIds().add(dataTaskEntity.getId());
            uploadTaskIdList.add(dataTaskEntity.getId());
            dataTaskEntity.setPadSn(kyPadInfo.getPadSn());
            dataTaskEntity.setDeptId(kyPadInfo.getDeptId());
            // 如果是个人用户设置,设置用户ID
            if (kyPadInfo.getDeptId().equals(DeptType.getIdByType(DeptNameConstants.ROLE_NAME_PERSONAL))) {
                dataTaskEntity.setUserId(kyPadInfo.getUserId());
            }
            // 插入任务
            dataTaskService.insertDataTask(dataTaskEntity);
            // 插入后的任务ID
            long dataTaskId = dataTaskEntity.getDataTaskId();
            // 测试结果
            List<DataDj> djResults = djTaskResqDTO.getResultList();
            if (!djResults.isEmpty()) {
                djResults.forEach(item -> item.setDataTaskId(dataTaskId));
                dataDjService.batchDataDj(djResults);
            }
            taskSubmitRespDTO.getSuccessTaskIds().add(djTaskResqDTO.getDataTaskEntity().getId());
        }
        log.error("电机任务提交：" + JSON.toJSONString(taskSubmitRespDTO));
        return taskSubmitRespDTO;
    }

    /**
     * 架空乘人提交数据
     *
     * @param kyPadInfo
     * @param dataJkcrVo
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public TaskSubmitResp submitJkcrTasks(KyPadInfo kyPadInfo, DataJkcrPadToServerDTO dataJkcrVo) {
        TaskSubmitResp taskSubmitRespDTO = new TaskSubmitResp();
        // 测试任务集合
        List<JkcrTaskReqDTO> jkcrTaskReqDTOList = dataJkcrVo.getData();
        // 先遍历数据，如果测试任务已经提交,则进行提示
        for (JkcrTaskReqDTO jkcrTaskDTO : jkcrTaskReqDTOList) {
            DataTaskEntity dataTaskEntity = jkcrTaskDTO.getDataTaskEntity();
            taskSubmitRespDTO.getUploadTaskIds().add(dataTaskEntity.getId());
            dataTaskEntity.setPadSn(kyPadInfo.getPadSn());
            dataTaskEntity.setDeptId(kyPadInfo.getDeptId());
            // 如果是个人用户设置,设置用户ID
            if (kyPadInfo.getDeptId().equals(DeptType.getIdByType(DeptNameConstants.ROLE_NAME_PERSONAL))) {
                dataTaskEntity.setUserId(kyPadInfo.getUserId());
            }
            // 单条插入任务
            dataTaskService.insertDataTask(dataTaskEntity);
            // 插入后的任务ID
            long dataTaskId = dataTaskEntity.getDataTaskId();
            //工作油压测试数据
            List<DataJkcrGzyy> jkcrGzyyResults = jkcrTaskDTO.getGzyyEntityList();
            if (!jkcrGzyyResults.isEmpty()) {
                jkcrGzyyResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataJkcrGzyyService.batchDataJkcrGzyy(jkcrGzyyResults);
            }
            //巷道倾角测试数据
            List<DataJkcrHdqj> jkcrHdqjResults = jkcrTaskDTO.getHdqjEntityList();
            if (!jkcrHdqjResults.isEmpty()) {
                jkcrHdqjResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataJkcrHdqjService.batchDataJkcrHdqj(jkcrHdqjResults);
            }
            //紧张力测试数据
            List<DataJkcrJzhl> jkcrJzhlResults = jkcrTaskDTO.getJzhlEntityList();
            if (!jkcrJzhlResults.isEmpty()) {
                jkcrJzhlResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataJkcrJzhlService.batchDataJkcrJzhl(jkcrJzhlResults);
            }
            //牵引力测试数据
            List<DataJkcrQyl> jkcrQylResults = jkcrTaskDTO.getQylEntityList();
            if (!jkcrQylResults.isEmpty()) {
                jkcrQylResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataJkcrQylService.batchDataJkcrQyl(jkcrQylResults);
            }
            //运行速度测试数据
            List<DataJkcrYxsd> jkcrYxsdResults = jkcrTaskDTO.getYxsdEntityList();
            if (!jkcrYxsdResults.isEmpty()) {
                jkcrYxsdResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataJkcrYxsdService.batchDataJkcrYxsd(jkcrYxsdResults);
            }
            //重车上行测试数据
            List<DataJkcrZhchshx> jkcrZhchshxResults = jkcrTaskDTO.getZhchshxEntityList();
            if (!jkcrZhchshxResults.isEmpty()) {
                jkcrZhchshxResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataJkcrZhchshxService.batchDataJkcrZhchshx(jkcrZhchshxResults);
            }
            //重车下行数据
            List<DataJkcrZhchxx> jkcrZhchxxResults = jkcrTaskDTO.getZhchxxEntityList();
            if (!jkcrZhchxxResults.isEmpty()) {
                jkcrZhchxxResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataJkcrZhchxxService.batchDataJkcrZhchxx(jkcrZhchxxResults);
            }
            // 制动力数据
            List<DataJkcrZhdl> jkcrZhdlResults = jkcrTaskDTO.getZhdlEntityList();
            if (!jkcrZhdlResults.isEmpty()) {
                jkcrZhdlResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataJkcrZhdlService.batchDataJkcrZhdl(jkcrZhdlResults);
            }
            taskSubmitRespDTO.getSuccessTaskIds().add(jkcrTaskDTO.getDataTaskEntity().getId());
        }

        log.error("架空乘人任务提交：" + JSON.toJSONString(taskSubmitRespDTO));
        return taskSubmitRespDTO;
    }

    /**
     * 无轨胶轮车提交数据
     *
     * @param kyPadInfo
     * @param dataWgjlcVo
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public TaskSubmitResp submitWgjlcTasks(KyPadInfo kyPadInfo, DataWgjlcPadToServerDTO dataWgjlcVo) {
        TaskSubmitResp taskSubmitRespDTO = new TaskSubmitResp();
        // 测试任务集合
        List<WgjlcTaskReqDTO> wgjlcTaskReqDTOList = dataWgjlcVo.getData();
        // 先遍历数据，如果测试任务已经提交,则进行提示
        for (WgjlcTaskReqDTO wgjlcTaskDTO : wgjlcTaskReqDTOList) {
            DataTaskEntity dataTaskEntity = wgjlcTaskDTO.getDataTaskEntity();
            taskSubmitRespDTO.getUploadTaskIds().add(dataTaskEntity.getId());
            dataTaskEntity.setPadSn(kyPadInfo.getPadSn());
            dataTaskEntity.setDeptId(kyPadInfo.getDeptId());
            // 如果是个人用户设置,设置用户ID
            if (kyPadInfo.getDeptId().equals(DeptType.getIdByType(DeptNameConstants.ROLE_NAME_PERSONAL))) {
                dataTaskEntity.setUserId(kyPadInfo.getUserId());
            }
            // 单条插入任务
            dataTaskService.insertDataTask(dataTaskEntity);
            // 插入后的任务ID
            long dataTaskId = dataTaskEntity.getDataTaskId();
            //常温启动测试数据
            List<DataWgjlcChwqd> chwqdResults = wgjlcTaskDTO.getChwqdEntityList();
            if (!chwqdResults.isEmpty()) {
                chwqdResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataWgjlcChwqdService.batchDataWgjlcChwqd(chwqdResults);
            }
            //最大操纵角测试数据
            List<DataWgjlcCzj> czjResults = wgjlcTaskDTO.getCzjEntityList();
            if (!czjResults.isEmpty()) {
                czjResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataWgjlcCzjService.batchDataWgjlcCzj(czjResults);
            }
            //最大操纵力测试数据
            List<DataWgjlcCzl> czlResults = wgjlcTaskDTO.getCzlEntityList();
            if (!czlResults.isEmpty()) {
                czlResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataWgjlcCzlService.batchDataWgjlcCzl(czlResults);
            }
            //坡道停车制动测试数据
            List<DataWgjlcPdtchzhd> pdtchzhdResults = wgjlcTaskDTO.getPdtchzhdEntityList();
            if (!pdtchzhdResults.isEmpty()) {
                pdtchzhdResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataWgjlcPdtchzhdService.batchDataWgjlcPdtchzhd(pdtchzhdResults);
            }
            //爬坡能力测试数据
            List<DataWgjlcPpnl> ppnlResults = wgjlcTaskDTO.getPpnlEntityList();
            if (!ppnlResults.isEmpty()) {
                ppnlResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataWgjlcPpnlService.batchDataWgjlcPpnl(ppnlResults);
            }
            //手刹力测试数据
            List<DataWgjlcShshl> shshlResults = wgjlcTaskDTO.getShshlEntityList();
            if (!shshlResults.isEmpty()) {
                shshlResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataWgjlcShshlService.batchDataWgjlcShshl(shshlResults);
            }
            //运行速度数据
            List<DataWgjlcSudu> suduResults = wgjlcTaskDTO.getSuDuEntityList();
            if (!suduResults.isEmpty()) {
                suduResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataWgjlcSuduService.batchDataWgjlcSudu(suduResults);
            }
            // 踏板力数据
            List<DataWgjlcTbl> tblResults = wgjlcTaskDTO.getTblEntityList();
            if (!tblResults.isEmpty()) {
                tblResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataWgjlcTblService.batchDataWgjlcTbl(tblResults);
            }
            // 温度保护数据
            List<DataWgjlcWdbh> wdbhResults = wgjlcTaskDTO.getWdbhEntityList();
            if (!wdbhResults.isEmpty()) {
                wdbhResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataWgjlcWdbhService.batchDataWgjlcWdbh(wdbhResults);
            }
            // 尾气数据
            List<DataWgjlcWeiqi> wqResults = wgjlcTaskDTO.getWeiQiEntityList();
            if (!wqResults.isEmpty()) {
                wqResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataWgjlcWeiqiService.batchDataWgjlcWeiqi(wqResults);
            }
            // 烟度计数据
            List<DataWgjlcYanduji> yandujiResults = wgjlcTaskDTO.getYanDuJiEntityList();
            if (!yandujiResults.isEmpty()) {
                yandujiResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataWgjlcYandujiService.batchDataWgjlcYanduji(yandujiResults);
            }
            // 压力保护数据
            List<DataWgjlcYlbh> ylbhResults = wgjlcTaskDTO.getYlbhEntityList();
            if (!ylbhResults.isEmpty()) {
                ylbhResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataWgjlcYlbhService.batchDataWgjlcYlbh(ylbhResults);
            }
            // 最大静制动力数据
            List<DataWgjlcZdjzdl> zdjzdlResults = wgjlcTaskDTO.getZdjzdlEntityList();
            if (!zdjzdlResults.isEmpty()) {
                zdjzdlResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataWgjlcZdjzdlService.batchDataWgjlcZdjzdl(zdjzdlResults);
            }
            // 最大牵引力数据
            List<DataWgjlcZdqyl> zdqylResults = wgjlcTaskDTO.getZdqylEntityList();
            if (!zdqylResults.isEmpty()) {
                zdqylResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataWgjlcZdqylService.batchDataWgjlcZdqyl(zdqylResults);
            }
            // 制动距离数据
            List<DataWgjlcZhdjlgps> zhdjlgpsResults = wgjlcTaskDTO.getZhdjlGpsEntityList();
            if (!zhdjlgpsResults.isEmpty()) {
                zhdjlgpsResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataWgjlcZhdjlgpsService.batchDataWgjlcZhdjlgps(zhdjlgpsResults);
            }
            // 照明及信号数据
            List<DataWgjlcZhmhxh> zhmhxhResults = wgjlcTaskDTO.getZhmhxhEntityList();
            if (!zhmhxhResults.isEmpty()) {
                zhmhxhResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataWgjlcZhmhxhService.batchDataWgjlcZhmhxh(zhmhxhResults);
            }
            // 噪声和警声数据
            List<DataWgjlcZshhjsh> zshhjshResults = wgjlcTaskDTO.getZshhjshEntityList();
            if (!zshhjshResults.isEmpty()) {
                zshhjshResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataWgjlcZshhjshService.batchDataWgjlcZshhjsh(zshhjshResults);
            }
            // 最小通过半径数据
            List<DataWgjlcZxtgbj> zxtgbjResults = wgjlcTaskDTO.getZxtgbjEntityList();
            if (!zxtgbjResults.isEmpty()) {
                zxtgbjResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataWgjlcZxtgbjService.batchDataWgjlcZxtgbj(zxtgbjResults);
            }
            taskSubmitRespDTO.getSuccessTaskIds().add(wgjlcTaskDTO.getDataTaskEntity().getId());
        }

        log.error("无轨胶轮车任务提交：" + JSON.toJSONString(taskSubmitRespDTO));
        return taskSubmitRespDTO;
    }

    /**
     * 皮带机提交数据
     *
     * @param kyPadInfo
     * @param dataPidaijiVo
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public TaskSubmitResp submitPidaijiTasks(KyPadInfo kyPadInfo, DataPidaijiPadToServerDTO dataPidaijiVo) {
        TaskSubmitResp taskSubmitRespDTO = new TaskSubmitResp();
        // 测试任务集合
        List<PidaijiTaskReqDTO> pidaijiTaskReqDTOList = dataPidaijiVo.getData();
        // 先遍历数据，如果测试任务已经提交,则进行提示
        for (PidaijiTaskReqDTO pidaijiTaskDTO : pidaijiTaskReqDTOList) {
            DataTaskEntity dataTaskEntity = pidaijiTaskDTO.getDataTaskEntity();
            taskSubmitRespDTO.getUploadTaskIds().add(dataTaskEntity.getId());
            dataTaskEntity.setPadSn(dataPidaijiVo.getPadSn());
            dataTaskEntity.setDeptId(kyPadInfo.getDeptId());
            // 如果是个人用户设置,设置用户ID
            if (kyPadInfo.getDeptId().equals(DeptType.getIdByType(DeptNameConstants.ROLE_NAME_PERSONAL))) {
                dataTaskEntity.setUserId(kyPadInfo.getUserId());
            }
            // 单条插入任务
            dataTaskService.insertDataTask(dataTaskEntity);
            // 插入后的任务ID
            long dataTaskId = dataTaskEntity.getDataTaskId();
            //称重测试数据
            List<DataPidaijiChengzhong> pidaijiChengzhongResults = pidaijiTaskDTO.getChengZhongEntityList();
            if (!pidaijiChengzhongResults.isEmpty()) {
                pidaijiChengzhongResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataPidaijiChengzhongService.batchDataPidaijiChengzhong(pidaijiChengzhongResults);
            }
            //径向跳动测试数据
            List<DataPidaijiJxtd> pidaijiJxtdResults = pidaijiTaskDTO.getJingXiangEntityList();
            if (!pidaijiJxtdResults.isEmpty()) {
                pidaijiJxtdResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataPidaijiJxtdService.batchDataPidaijiJx(pidaijiJxtdResults);
            }
            //能耗测试数据
            List<DataPidaijiNh> pidaijiNhResults = pidaijiTaskDTO.getNengHaoEntityList();
            if (!pidaijiNhResults.isEmpty()) {
                pidaijiNhResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataPidaijiNhService.batchDataPidaijiNh(pidaijiNhResults);
            }
            //跑偏保护作用力测试数据
            List<DataPidaijiPpzyl> pidaijiPpzylResults = pidaijiTaskDTO.getPpbhzylEntityList();
            if (!pidaijiPpzylResults.isEmpty()) {
                pidaijiPpzylResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataPidaijiPpzylService.batchDataPidaijiPpzyl(pidaijiPpzylResults);
            }
            //堆煤保护作用力测试数据
            List<DataPidaijiDmbhzyl> pidaijiDmbhzyResults = pidaijiTaskDTO.getDmbhzylEntityList();
            if (!pidaijiDmbhzyResults.isEmpty()) {
                pidaijiDmbhzyResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataPidaijiDmbhzylService.batchDataPidaijiDmbhzyl(pidaijiDmbhzyResults);
            }
            //速度测试数据
            List<DataPidaijiSudu> pidaijiSuduResults = pidaijiTaskDTO.getSpeedEntityList();
            if (!pidaijiSuduResults.isEmpty()) {
                pidaijiSuduResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataPidaijiSuduService.batchDataPidaijiSudu(pidaijiSuduResults);
            }
            //油压数据
            List<DataPidaijiYy> pidaijiYyResults = pidaijiTaskDTO.getYouYaEntityList();
            if (!pidaijiYyResults.isEmpty()) {
                pidaijiYyResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataPidaijiYyService.batchDataPidaijiYy(pidaijiYyResults);
            }
            //轴向数据
            List<DataPidaijiZx> pidaijiZxResults = pidaijiTaskDTO.getZhouXiangEntityList();
            if (!pidaijiZxResults.isEmpty()) {
                pidaijiZxResults.forEach(item -> item.setDataTaskId(dataTaskId));
                // 批量插入测试数据
                dataPidaijiZxService.batchDataPidaijiZx(pidaijiZxResults);
            }
            taskSubmitRespDTO.getSuccessTaskIds().add(pidaijiTaskDTO.getDataTaskEntity().getId());
        }
        log.error("皮带机任务提交：" + JSON.toJSONString(taskSubmitRespDTO));
        return taskSubmitRespDTO;
    }

}
